package client;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JFrame;
import javax.swing.JTable;
public class Matrice extends JFrame implements MouseListener

{

	private static final long serialVersionUID = 1L;
	private JTable jTable=new JTable();
	public Matrice(){
		Object[][] donnees = {  
			      {"Swing", "Astral"}, 
			      {"Swing", "Mistral"}, 
			    
			} ;
		Object[] titreColonnes = { "",""}; 
		jTable = new JTable(donnees, titreColonnes);
		
		this.add(jTable);
		jTable.addMouseListener(new MouseAdapter() {
		    public void mouseClicked(MouseEvent e)
		    {
		    	System.out.println(jTable.getSelectedColumn());
				System.out.println(jTable.getSelectedRow());
		    }
		    });
		   
		
		
		
	}
	public static void main(String[]args){
		JFrame frame=new Matrice();
		frame.pack();
		frame.setVisible(true);
		frame.setLocation(450,150);
		
	}
	
	public void mouseClicked(MouseEvent arg0) {}

	public void mouseEntered(MouseEvent arg0) {}
	
	public void mouseExited(MouseEvent arg0) {}

	public void mousePressed(MouseEvent arg0) {}
	
	public void mouseReleased(MouseEvent arg0) {}
}
